package com.hex.ds.hdrs.cron.dto;

import com.hex.ds.hdrs.common.enums.CronTaskDefStatusEnum;
import com.hex.ds.hdrs.common.enums.ExcelImportOperationEnum;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class CronTaskExportDto {

    private String taskCode;

    private String taskName;

    private String taskDesc;

    private String taskStatus;

    private String cronExpress;

    private Integer resNum;

    private String appointAgentCode;

    private String taskStDate;

    private String taskEndDate;

    private String isValidDate;

    private String shellPath;

    private String extParam;

    private String planExecDuration;

    private String overPlanDuration;

    private String operation;

    public String getOperation() {
        return ExcelImportOperationEnum.U.getValue();
    }

    public String getTaskStatus() {
        return CronTaskDefStatusEnum.fromJCronTaskDefStatusEnum(taskStatus).getValue();
    }

    public String getIsValidDate() {
        return ("1".equals(isValidDate)) ? "是" : "否";
    }
}
